%::PROVIDES=(
	name	=> ["GET_NODE_STATE"],
	desc	=> ["Return current node status"],
	type	=> "request",
	code	=> \&::do_handle_getnodestate
);

sub ::do_handle_getnodestate {
my $args=shift;

	if(!exists($args->{NODE})) {
		logwarn("NODE request missing file argument");
		return "ARG_MISSING";
	}

	$n=$args->{NODE};
	if($n ne $this_node && $n ne $other_node) {
		logwarn("NODE requested is unknown!");
		return "NODE_UNKNOWN";
	}
	if($n eq $this_node) {
		return $NODE_STATE;
	} else {
		if($given_serverdied_error) {
			return "DIED";
		}
		return $OTHER_NODE_STATE;
	}
}

1;
